Skip to content

Conversation

@rdimitrov
Copy link
Contributor

Bumps the version of Go to 1.24.9.

This fixes several security vulnerabilities found in older versions of Go. For reference - https://github.com/theupdateframework/go-tuf/actions/runs/18939463805/job/54074306468?pr=697

Signed-off-by: Radoslav Dimitrov <[email protected]>
@kommendorkapten
Copy link
Member

Something broke the tests:

--- FAIL: TestSignVerify (0.03s)
    metadata_api_test.go:421: 
        	Error Trace:	/Users/runner/work/go-tuf/go-tuf/metadata/metadata_api_test.go:421
        	Error:      	Received unexpected error:
        	            	unsigned metadata error: problem signing metadata
        	Test:       	TestSignVerify
    metadata_api_test.go:423: 
        	Error Trace:	/Users/runner/work/go-tuf/go-tuf/metadata/metadata_api_test.go:423
        	Error:      	Not equal: 
        	            	expected: 1
        	            	actual  : 0
        	Test:       	TestSignVerify
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x102c6af98]

@rdimitrov
Copy link
Contributor Author

rdimitrov commented Oct 30, 2025

Yeah, it seems we hit a requirement that got introduced in the newer crypto packages of Go.

I have temporarily disabled this since it's solely used in our tests (fixtures) but my assumption is that once #695 lands we'll have that sorted out (cc: @MDr164)

Details about the issue:

  • Go 1.24 introduced a security enhancement that enforces a minimum RSA key size of 1024 bits
  • The test repository's timestamp_key is only 1023 bits (1 bit short!), the other ones are okay (1024)
  • When Go 1.24 tries to sign metadata with this undersized key, the crypto/rsa package rejects it and returns an error
  • This causes tests to fail with: "unsigned metadata error: Verifying timestamp failed, not enough signatures, got 0, want 1"
  • Added GODEBUG=rsa1024min=0 before running the unit tests (.github/workflows/tests.yml & Makefile test target) temporarily disables the 1024-bit minimum check and allows the existing 1023-bit key to work.

@rdimitrov rdimitrov merged commit 3ace7ea into master Nov 4, 2025
23 checks passed
@rdimitrov rdimitrov deleted the bump-go branch November 4, 2025 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants